{extend name="public:base" /}
{block name="css"}
<link href="/static/laydate/theme/default/laydate.css">
{/block}
{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h3>总订单金额：{$all_pay_price}元</h3>
                </div>

                <div class="ibox-content">
                    <div class="row search-form">
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="请选择开始日期" type="text" name="start_time" value="{:input('start_time')}" class="form-control form-control-lg screen-date" readonly>
                            </div>
                        </div>
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="请选择结束日期" type="text" name="end_time" value="{:input('end_time')}" class="form-control form-control-lg screen-date" readonly>
                            </div>
                        </div>
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <select name="status" class="form-control form-control-lg">
                                    <option value="">请选择订单状态</option>
                                    <option value="1" {:input('status') == 1 ? 'selected' : ''}>待付款</option>
                                    <option value="2" {:input('status') == 2 ? 'selected' : ''}>待发货</option>
                                    <option value="3" {:input('status') == 3 ? 'selected' : ''}>待收货</option>
                                    <option value="4" {:input('status') == 4 ? 'selected' : ''}>待评价</option>
                                    <option value="5" {:input('status') == 5 ? 'selected' : ''}>已完成</option>
                                    <option value="7" {:input('status') == 6 ? 'selected' : ''}>售后中</option>
                                    <option value="8" {:input('status') == 7 ? 'selected' : ''}>售后完成</option>
                                    <option value="10" {:input('status') == 10 ? 'selected' : ''}>已取消</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <select name="after_status" class="form-control form-control-lg">
                                    <option value="">请选择订单售后状态</option>
                                    <option value="0" {:input('after_status') == 0 && input('after_status') !='' ?  'selected' : ''}>未售后</option>
                                    <option value="1" {:input('after_status') == 1 ? 'selected' : ''}>售后中</option>
                                    <option value="2" {:input('after_status') == 2 ? 'selected' : ''}>售后成功</option>
                                    <option value="3" {:input('after_status') == 3 ? 'selected' : ''}>售后失败</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <button type="button" class="btn btn-primary btn-lg screen-btn">搜索</button>
                            </div>
                        </div>
                    </div>
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>会员昵称</th>
                                <th>会员手机号</th>
                                <th>订单号</th>
                                <th>总金额</th>
                                <th>支付金额</th>
                                <th>订单状态</th>
                                <th>售后状态</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.username}</td>
                                <td>{$vo.mobile}</td>
                                <td>{$vo.order_sn}</td>
                                <td>{$vo.all_price}</td>
                                <td>{$vo.pay_price}</td>
                                <td>{$vo.status_text}</td>
                                <td>{$vo.after_status_text}</td>
                                <td>{:timeFormat($vo.create_time)}</td>
                                <td class="project-actions">
                                    <a href="{:url('doOrder', ['id' => $vo.id])}" class="btn btn-white btn-sm">
                                        <i class="iconfont icon-edit"></i> 详情
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {if !empty($list)}{$list->render()}{/if}
                    </div>

                </div>
            </div>
        </div>

    </div>
</div>

{/block}

{block name="js"}
<script src="/static/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '.screen-date' //指定元素
    });
</script>
{/block}

